package com.xuxu.blog.utils;

import org.apache.commons.lang3.RandomUtils;

/**
 * @className: RandomUtil
 * @author: Maxuxu
 * @date: 2022/8/22 15:47
 * @description: 生成随机数字
 */

public class RandomUtil {
    /**
     * 生成四位随机数
     * @return
     */
    public static int random4Num(){
        return RandomUtils.nextInt(1000, 9999);
    }

    /**
     * 生成六位随机数
     * @return
     */
    public static int random6Num(){
        return RandomUtils.nextInt(100000, 999999);
    }
}
